Postgresql Check If Value In Dictionary