Check for existence of register function on required object instead of using try/catch