Capaldi was cast as the Doctor in the BBC science-fiction series Doctor Who