fixes 'object is not a function' issue when having a file in api/models without a valid schema function