Bug 1042319 - [Gallery] Update gallery edit UI r=djf

Since this change is inside ImageEditor API,  putting this extra check to see that variable is of type function, I think it's an overkill and can be updated to check just for null.