Checking for the same thing in an array twice

Same item was being checked in the array for presence and absence. Changed this to an if else statement.