minor performance improvement on arrayIndexOf

remove conditional check on each call