have_key and have_keys always fails if the subject is not a dict