Modified argument check

Changed argument check from less than or greater than to !=. Less code, same goal.