Php Convert Null To Empty Array Javascript Methods