Making onOpen and onClose data attributes optional

When programmatically opening and closing sidr the `onClose` and `onOpen` callbacks required data attributes even though you may not require them.

This PR adds a fallback to empty function for both attributes if they are not set.