Switch the `is_array()` and `empty()` checks in the `User` class