[FixRM 8489] undefined method `empty?' for nil:NilClass in msfcli

This fixes a undefined method `empty?' for nil:NilClass (NoMethodError)
in msfcli. [SeeRM 8489]
Land #2519, undefined method fix for msfcli