digitalWrite: handle case where boolean is passed as value