identation fixed for readability
using angular test functions to test for arrays and objects and null to
ignore arguments