Check this post response to cross check with your codes, if you are implementing the same way
let me know if you still have doubt, Also try to post screenshot of complete error, that helps alot at understanding which line of code might need attention.