Fixed beforeCreate check for existing professor