Removed nullpointerexception check from constructor as it is not needed.