Fixed review comments. Added Error logic to validate type property