This could simply be changed to `if $ssh_key {` as being `undef` will return false