Fix a bug if mongoose path does not exist