Add check if masonry already initialized for the element before calling any methods of masonry

cannot call methods on masonry prior to initialization; attempted to call 'resize'
cannot call methods on masonry prior to initialization; attempted to call 'appended'