added array check for 0 index issue
Merge pull request #156 from PrimeRevenue/defect/require_check

added array check for 0 index issue