Fix an annoying edge case in lastIndexOf(null)