fix recent mistake in type checking for new()