Use try block to define first and last name