Consolidate pthread_attr value validation