Fixed update to new question by checking condition of Integer and not
String. String comparison of integers was not accurate.