If you connect direct to battery I’m sure it’ll be fine. Any bike specific 12volt charger would be fine direct to the battery too.
With car or other 12v chargers it would be wise need to check how powerful they vs how much your bike battery can take for charging.