Added record parsing and unit tests to check that created record types are valid.
@jbigot, @tpaluszk could you review?