fix case where val is null
fix issue in mf.js for array objects