Use raise PluginError or PluginWarning instead of logging an message and then returning none, which you then need to check for. Exceptions are meant for error handling, not None return values :)