Throw error on invalid extraProperties

See issue #10