Javascript Check If Variable Is Array Mutable