Tighten up validation checks, add back missing code

Fixes #79 by using ===
Fix for null values