Dumb type in database if/else