Added null check for profile name

Missed one spot -- @chrisndodge