Defining gravitational singularities in general relativity