Updated to include spec test for nil attributes