array_shift returns null on empty array, not false