Postgres Function Check If Variable Is String