make sure session name is valid