Added procedure parameter checking