Energy conditions and spacetime singularities