Fix: indexOf() and lastIndexOf() method with null argument