support for non-callback functions with a promised instance.

Signed-off-by: Johny Jose <johny@playlyfe.com>