Separated utility into array and safe_class