Cast gpio input to bool