refactoring: adjusts the code how models types are being validated