Enhanced _isEmpty and _isNonEmpty to deal with params

Previously, these only worked with the received context, and did nothing
with parameters.  This bit Eric on the ass, since he expected params to
work.  So in the name of DWIM, this now uses params if they are there.