Guard against null element in get-attrs-from-styles so that when the
DOM node is not available the function returns the provided defaults
instead of throwing 'Cannot read properties of null (reading style)'.
Signed-off-by: Andrey Antukh <niwi@niwi.nz>