Singularity avoidance in quantum gravity