fix to check if components globals are not null