FIX: Added null check in constructor