add handle nil checks to methods
add handle nil checks to methods

I loathe this commit.

When a command with no subcommand is processed and the code subsequently
accesses ci.SubCmdInst.GetParam() or similar, it blows up because the
SubCmdInst field is nil. The method call actually succeeds but blows up
on trying to access members of the SubCmdInst. This is one of the perils
of working with pointers. Short of rewriting to force everything
through methods and heaps of error checking, this seems to be the
least-bad compromise.

The code will still blow up, but it will at least blow up in an
informative way - the panic will happen immediately after calling a
method on a nil handle so the stack trace isn't so confusing. I wrote
the code and before this change it was difficult to tell what happened.
Now it says you have a bug and it's because of a nil handle, so it
should make it  bit easier to track down this class of error.

Netflix/hal-9001