fixed bug in `sortBy`: ascending and descending were the wrong way round
added a `strip_null` method