added check to allow for 0 argument functions to not be nested in an array