Fix some possibly NULL pointers reported by CLANG

None of these have ever occurred, but these changes will harden Slurm
bug 403