Do null check on truck here.  If it is null, add in a print statement saying the truck wasn't found and return false.  Then in the CLI code you can remove the print statement saying what went wrong if a null comes back.