Added some error handling to patient and doctor input