type conversion in accordance with propTypes