Matlab Check Empty Array Javascript Methods