cast ::class to string variant to solve further object return issues