make sure name is defined