Avoiding unneccesary exception

This class is based on different configuration that can be hard to
trace, so it's better to log and return null than send an exception.
This seems to be the way to do it in other parts of the method.