added if condition to formatNoMatches func

if no matches found message is string, just render it, otherwise pass it
to render function as an object