Improves nil handling in command_interface.rb