Fix for the grid search if the sparseness argument is not given.
This argument can be None, so this is now being checked before checking if it has elements.
Authored by: bugman 2013-04-05
Parent: [r126]
Child: [r128]