Nebulae as gravitational lenses