Allowing setting of margin values to 0.

Due to the way JS evaluates 0 as false within a conditional, explicitly
testing for a non-null value before applying margin settings. This
allows a user to provide 0 for margin settings.