[FIX] Return nil when calling 'maximum' on an empty result set. Causes exceptions otherwise.