Provide nextResultOrNil
Minor pretty printing fix