fixed user type check method