Harden locate symbol. Sometimes there is no source provider.

This used to cause an NPE in the Play plugin when hovering over a Routes
name (it’s source file is Java, and we don’t have a source file provider for Java).

/cc @skyluc @huitseeker