Checking for factor base
It can be done using any method you have at your disposal. Obviously, the more efficient method you use, the more efficient your algorithm will be, but even using trial division will yield a significantly more efficient algorithm than if you used trial division for the entire factorisation. Algorithms based on elliptic curves are also commonly used since they are especially good at identifying small prime factors.

By the way, this is not directly related to cryptography so you may get better answers on Math.SE.