added validation for creating and editing movies