Jim Cramer says investors should consider 3 things before buying a stock