Matlab Check Empty Array Javascript Methods For Objects