fix explicit check for no result from db