Javascript Check Array Not Null Or Empty