Or perhaps even combine is_string && array_key_exists