You asked to check the variable in the mapping but I'm going to suggest an alternative approach that will make things a lot easier and give you more flexibility if you want to change anything later.
Since you are using a function anyways my advice is to put everything in there. That simplifies things and avoids some issues you might have with escaping characters and using compound commands. Plus, you're talking about adding a conditional and things are going to start getting really crowded in that mapping line.
let l:filename = input("Enter filename: ")
while len(l:filename) == 0
let l:filename = input("Invalid. Enter filename:")
exe ":e " . l:filename
exe "norm i "
nnoremap <leader>sn :call s:EnterFileName()<cr>
inputsave/inputrestore just to focus on the new stuff.)
This uses a while loop to continually query the user until they enter a non-empty string. Then it opens the file with the entered name, inserts text (looks like you just insert a space (?) ... modify as you need), and saves the file.
You'll notice a couple uses of
:exe. That's needed when using a variable with an Ex command (first instance) and so we can get a space in the insertion part. (Again, modify as needed.)
The mapping simply calls the function.