instanceof added to check calling with new for constructors