Create getBoolean function from cursor