Return the created object as NULL if constructor failed.