Checks if invokeCallback is defined before triggering it.

Issue:
https://github.com/blackberry/BB10-WebWorks-Framework/issues/525