Add check if register function exists, if not throw Error