Comparing serial data with if statements in processing