Fixes error caused when 'element' param was not set for the query;
accepts boolean false for any type of ID queries