Added support for Runnable and Callable with null as result.