Just `if (!is_array($guessedAttributes)) {` is enough.