[CB-2666] Added check for null arguments.

If null arguments are received, send an error and an explanation.
[CB-2654] Delay executeScript/insertCSS callback until resources have loaded; pass JS results to callback