Avoid strpos bug if string is empty or null