I found what was causing the error, I had a set of options coming from database, those options were still not loaded so that error was occurring, it got resolved with a simple {options.length >=1 &&...
{options.length >=1 &&...