I'm developing a basic sculpting addon for practice and one of the features I'd like to include in this addon requires modes to be set explicitly.
Here's an example of the type of api that I'm looking for.
if bpy.context.mode != 'OBJECT':
I tried looking for something on my own, but I only found methods that toggle the mode.
Is there a method like what I was describing that would do the job?