Add cast to string on binary mode check.