fix JS dim extraction null handling + test case