Moving the if rather then duplicate the same if check twice