diff --git a/pyais/messages.py b/pyais/messages.py
index 07478b9..3cdd34d 100644
--- a/pyais/messages.py
+++ b/pyais/messages.py
@@ -563,7 +563,7 @@ class MessageType4(Payload):
     lat = bit_field(27, int, from_converter=from_lat_lon, to_converter=to_lat_lon, signed=True, default=0)
     epfd = bit_field(4, int, default=0, from_converter=EpfdType.from_value, to_converter=EpfdType.from_value)
     spare = bit_field(10, int, default=0)
-    raim = bit_field(1, int, default=0)
+    raim = bit_field(1, bool, default=0)
     radio = bit_field(19, int, default=0)
 
 
@@ -669,7 +669,7 @@ class MessageType9(Payload):
     dte = bit_field(1, int, default=0)
     spare = bit_field(3, int, default=0)
     assigned = bit_field(1, int, default=0)
-    raim = bit_field(1, int, default=0)
+    raim = bit_field(1, bool, default=0)
     radio = bit_field(20, int, default=0)
 
 
@@ -1297,7 +1297,7 @@ class MessageType27(Payload):
     mmsi = bit_field(30, int, from_converter=from_mmsi, to_converter=to_mmsi)
 
     accuracy = bit_field(1, int, default=0)
-    raim = bit_field(1, int, default=0)
+    raim = bit_field(1, bool, default=0)
     status = bit_field(4, int, default=0, from_converter=NavigationStatus, to_converter=NavigationStatus)
     lon = bit_field(18, int, from_converter=from_lat_lon_600, to_converter=to_lat_lon_600, default=0)
     lat = bit_field(17, int, from_converter=from_lat_lon_600, to_converter=to_lat_lon_600, default=0)

diff --git a/tests/test_decode.py b/tests/test_decode.py
index 8442ca3..c1ac917 100644
--- a/tests/test_decode.py
+++ b/tests/test_decode.py
@@ -101,6 +101,7 @@ class TestAIS(unittest.TestCase):
         assert msg['second'] == 34
         assert msg['maneuver'] == ManeuverIndicator.NotAvailable
         assert msg['raim']
+        assert isinstance(msg['raim'], bool)
 
     def test_msg_type_1_c(self):
         msg = decode(b"!AIVDM,1,1,,B,181:Kjh01ewHFRPDK1s3IRcn06sd,0*08").asdict()
@@ -226,6 +227,7 @@ class TestAIS(unittest.TestCase):
         assert msg['dte'] == 1
         assert msg['radio'] == 33392
         assert not msg['raim']
+        assert isinstance(msg['raim'], bool)
 
     def test_msg_type_10_a(self):
         msg = decode(b"!AIVDM,1,1,,B,:5MlU41GMK6@,0*6C").asdict()
@@ -360,6 +362,7 @@ class TestAIS(unittest.TestCase):
         assert msg['msg22'] == 1
         assert not msg['assigned']
         assert not msg['raim']
+        assert isinstance(msg['raim'], bool)
 
     def test_msg_type_19(self):
         msg = decode(b"!AIVDM,1,1,,B,C5N3SRgPEnJGEBT>NhWAwwo862PaLELTBJ:V00000000S0D:R220,0*0B").asdict()

RAIM field integer in message type 4, otherwise boolean?
I've found in messages of type 4 the RAIM flag is an integer. But for other messages it is a boolean? I'm not sure if this is a bug or by design?
tests/test_decode.py::TestAIS::test_msg_type_9
tests/test_decode.py::TestAIS::test_broken_messages tests/test_decode.py::TestAIS::test_byte_stream tests/test_decode.py::TestAIS::test_decode_and_merge tests/test_decode.py::TestAIS::test_decode_out_of_order tests/test_decode.py::TestAIS::test_decode_pos_1_2_3 tests/test_decode.py::TestAIS::test_empty_channel tests/test_decode.py::TestAIS::test_issue_46_a tests/test_decode.py::TestAIS::test_issue_46_b tests/test_decode.py::TestAIS::test_issue_50 tests/test_decode.py::TestAIS::test_msg_too_short_enum_is_none tests/test_decode.py::TestAIS::test_msg_type_10_a tests/test_decode.py::TestAIS::test_msg_type_10_b tests/test_decode.py::TestAIS::test_msg_type_11 tests/test_decode.py::TestAIS::test_msg_type_12_a tests/test_decode.py::TestAIS::test_msg_type_12_b tests/test_decode.py::TestAIS::test_msg_type_13 tests/test_decode.py::TestAIS::test_msg_type_14 tests/test_decode.py::TestAIS::test_msg_type_15_a tests/test_decode.py::TestAIS::test_msg_type_15_b tests/test_decode.py::TestAIS::test_msg_type_16 tests/test_decode.py::TestAIS::test_msg_type_17_a tests/test_decode.py::TestAIS::test_msg_type_17_b tests/test_decode.py::TestAIS::test_msg_type_18 tests/test_decode.py::TestAIS::test_msg_type_19 tests/test_decode.py::TestAIS::test_msg_type_1_a tests/test_decode.py::TestAIS::test_msg_type_1_b tests/test_decode.py::TestAIS::test_msg_type_1_c tests/test_decode.py::TestAIS::test_msg_type_20 tests/test_decode.py::TestAIS::test_msg_type_21 tests/test_decode.py::TestAIS::test_msg_type_22_addressed tests/test_decode.py::TestAIS::test_msg_type_22_broadcast tests/test_decode.py::TestAIS::test_msg_type_23 tests/test_decode.py::TestAIS::test_msg_type_24 tests/test_decode.py::TestAIS::test_msg_type_25_a tests/test_decode.py::TestAIS::test_msg_type_25_b tests/test_decode.py::TestAIS::test_msg_type_25_c tests/test_decode.py::TestAIS::test_msg_type_26_a tests/test_decode.py::TestAIS::test_msg_type_26_b tests/test_decode.py::TestAIS::test_msg_type_27 tests/test_decode.py::TestAIS::test_msg_type_3 tests/test_decode.py::TestAIS::test_msg_type_4_a tests/test_decode.py::TestAIS::test_msg_type_4_b tests/test_decode.py::TestAIS::test_msg_type_5 tests/test_decode.py::TestAIS::test_msg_type_6 tests/test_decode.py::TestAIS::test_msg_type_7 tests/test_decode.py::TestAIS::test_msg_type_8 tests/test_decode.py::TestAIS::test_msg_with_more_that_82_chars_payload tests/test_decode.py::TestAIS::test_multiline_message tests/test_decode.py::TestAIS::test_nmea_decode tests/test_decode.py::TestAIS::test_nmea_decode_unknown_msg tests/test_decode.py::TestAIS::test_none_value_converter_for_creation tests/test_decode.py::TestAIS::test_none_value_converter_for_decoding tests/test_decode.py::TestAIS::test_none_values_converter_for_all_messages tests/test_decode.py::TestAIS::test_to_dict_non_enum tests/test_decode.py::TestAIS::test_to_json tests/test_decode.py::TestAIS::test_type_22_very_short tests/test_decode.py::TestAIS::test_type_25_very_short tests/test_decode.py::TestAIS::test_type_26_very_short