Use `whoami` only if $USER doesn't exist