made an if statement for my query.