Include missing dependency.
Fix error when trying to get class from string.
Fixing typo in variable; handling cases where value is null.