check if menu location isset

@johnciacia I couldn't reproduce the notice, but this change should fix it. 
fixes #1