Added true to nil-safe option of class_instance function