-Consistent JS element checking