Minor update to check for nil