Should this not be `space.is_kind_of`? (Same for those checks below)