check if j is missing before checking bounds
Merge pull request #3 from ahardjasa/mybranch

check if j is missing before checking bounds