Guard kasfShipsCount() against NULL argument.