[Android][Beta] Add validation for get navigation item

If the input parameter is out of scope, it will cause crash.
Add validation here to avoid crash.

BUG=XWALK-1874
(cherry picked from commit 4b79f46b55406b2aa6abaea154dc2441072e1a14)
Merge pull request #2049 from kurli/index_check_crosswalk_6

[Android][Beta] Add validation for get navigation item