     pdu.sequence_number |> to_int
   end
 
-  @spec mandatory_field(t, atom) :: any
+  @spec mandatory_field(t, atom) :: term
 
   @doc """
   Get Pdu mandatory field. If Pdu does not have the field, `nil` is returned.

    pdu.command_id |> to_int
  end

  @spec command_status(t) :: integer

  @doc """
  Returns Pdu's `command_status`.

    pdu.command_status |> to_int
  end

  @spec sequence_number(t) :: non_neg_integer

  @doc """
  Returns Pdu's `sequence_number`.
