added a guard for name