make this an `@inline def` so we only do this check when necessary?