If Not Empty Array Javascript Append Method