Yes it does. There are two conditions:
1) You must be wearing a helmet
2) The driver of the motorcycle must have a valid driving license
If you are using a paid motorcycle taxi service (including GoJek, Grab, Uber etc) it is always assumed that the driver is properly licensed (you don't need to check it each time). If you are driving yourself, you need to be licensed (either a local or an international license is fine). If a friend or other person is driving you, you are expected to check that they are properly licensed (this is hopefully common sense for most people).
Always wear a helmet, and drive carefully.