improved gpio pullType method