Also, getAttribute can return null, so using `indexOf` on it will throw.