Fix a bug in ScriptableFuture.onSuccess method.

Currently a onSuccess callback of ScriptableFuture is not called if the
result is null, because null is not matched with AnyRef.