There are only a few things to be careful with:
Don't stick anything sharp up your ass, or that could pinch your rectum walls (Obviously).
Don't stick anything glass up your ass, since it could shatter, unless it's meant to go there. The same goes for things that could break and get stuck or have multiple parts, especially removable parts (like pen caps)
Don't stick anything up your ass that doesn't have either a flared base or a way to get out (unless its small enough)
Be careful about anything potentially chemical in your ass. Your rectum absorbs chemicals incredibly easily. In general, if you wouldn't eat it, probably don't stick it up your ass (or at least check and see if other people have done it safely before first). Also, when it comes to certain things with chemical sensation (like ginger), just because it can go in your ass doesn't mean it will be fun to have in your ass, especially if you're not into pain. Of course, some people love that, in which case go for it!
If you ever do get something stuck in your ass, head straight to an emergency room! Don't worry, they've seen it all.