Ajax error on Safari

Whenever page.hide 'header' is called from controller, it shows
TypeError: value undefined .. not an object.

What could be wrong?
Works fine on FF and IE