Without the check added in this patch if the class doesn't exist a std::bad_function_call is thrown which is not very informative. Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>