Added null-check for contactName